<?php

/** Framework_Controller_Request_Abstract */
require_once 'Framework/Controller/Request/Abstract.php';

/** Framework_Controller_Response_Abstract */
require_once 'Framework/Controller/Response/Abstract.php';

abstract class Framework_Controller_Plugin_Abstract
{
    /**
     * @var Framework_Controller_Request_Abstract
     */
    protected $_request;

    /**
     * @var Framework_Controller_Response_Abstract
     */
    protected $_response;

    /**
     * Set request object
     *
     * @param Framework_Controller_Request_Abstract $request
     * @return Framework_Controller_Plugin_Abstract
     */
    public function setRequest(Framework_Controller_Request_Abstract $request)
    {
        $this->_request = $request;
        return $this;
    }

    /**
     * Get request object
     *
     * @return Framework_Controller_Request_Abstract $request
     */
    public function getRequest()
    {
        return $this->_request;
    }

    /**
     * Set response object
     *
     * @param Framework_Controller_Response_Abstract $response
     * @return Framework_Controller_Plugin_Abstract
     */
    public function setResponse(Framework_Controller_Response_Abstract $response)
    {
        $this->_response = $response;
        return $this;
    }

    /**
     * Get response object
     *
     * @return Framework_Controller_Response_Abstract $response
     */
    public function getResponse()
    {
        return $this->_response;
    }

    /**
     * Called before Framework_Controller_Front begins evaluating the
     * request against its routes.
     *
     * @param Framework_Controller_Request_Abstract $request
     * @return void
     */
    public function routeStartup(Framework_Controller_Request_Abstract $request)
    {}

    /**
     * Called after Framework_Controller_Router exits.
     *
     * Called after Framework_Controller_Front exits from the router.
     *
     * @param  Framework_Controller_Request_Abstract $request
     * @return void
     */
    public function routeShutdown(Framework_Controller_Request_Abstract $request)
    {}
}
